package com.molin.setTest.treeSetTest;

import java.util.TreeSet;

public class TreeSetTest {
    //主要判断： 比三门成绩之和，逆序排列
    //次要判断：成绩相同时，比较语文成绩->数学->英语->都一样则按照姓名进行排序。（大到小）
    //次要判断：成绩完全相同时，按照学生姓名进行排列。（A-Z)
    public static void main(String[] args) {
        TreeSet<Student> students=new TreeSet<>();
        students.add(new Student("zhangsan",80,80,80));
        students.add(new Student("wangwu1",90,91,90));
        students.add(new Student("wangwu2",91,90,90));
        students.add(new Student("xiaoli",100,100,100));
        for (Student student : students) {
            System.out.println(student.toString());
        }
    }
}
